﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using web.data.entities;
using web.bussines;
using Webdiyer.WebControls.Mvc;
using System.Web.UI;
using web.core.Controllers;

namespace web.core.Models
{
    public class clientContactModels
    { 
        //get all get all
        public static PagedList<client_contact> client_contact_plist( int pageindex, int pagesize, bool? is_read)
        {
            var obj = new client_contact_service();
            return obj.client_contact_plist(is_read, pageindex, pagesize);
        }

        //get list client_contact 
        public static List<client_contact> client_contact_list(bool? is_read)
        {
            var obj = new client_contact_service();
            return obj.client_contact_list(is_read ?? true);
        }

        public static long update(client_contact it)
        {
            var obj = new client_contact_service();
            return obj.update(it);
        }
        //cap nhat trang thai
        public static long updateStatus(long id, bool is_read)
        {
            var obj = new client_contact_service();
            return obj.updateStatus(id, is_read);
        }
        //get items by id or code
        public static client_contact getByID(long id)
        {
            var obj = new client_contact_service();
            return obj.getByID(  id);
        }

        //delete by id
        public static void deleteItem(long id)
        {
            var obj = new client_contact_service();
            obj.deleteItem(id);
        }

    }
}